<?php
include('mainfile.php');

header('Cache-Control: max-age=2592000, public'); 
header('Expires-Active: On'); 
header('Expires: Fri, 1 Jan 2500 01:01:01 GMT'); 
header('Pragma:'); 
header('Content-type: text/javascript');

ob_start('ob_gzhandler');
 
if(is_array($_SESSION['JSSources'])) foreach($_SESSION['JSSources'] as $source) echo file_get_contents($source);
if(is_array($_SESSION['JSScripts'])) foreach($_SESSION['JSScripts'] as $script) echo htmlspecialchars_decode($script, ENT_QUOTES);

$_SESSION['JSSources'] = array();
$_SESSION['JSScripts'] = array();
?>